// ==UserScript==
// @name         Add CSS
// @namespace    http://tampermonkey.net/
// @version      0.1
// @description  try to take over the world!
// @author       You
// @match        http://*/*
// @icon         
// @grant        none
// ==/UserScript==

// 添加全局样式，给下载按钮用
const cssStr = `
.root-198 {
  outline: transparent;
  position: relative;
  -webkit-font-smoothing: antialiased;
  font-size: 14px;
  font-weight: 400;
  box-sizing: border-box;
  border: 1px solid rgb(138, 136, 134);
  display: inline-block;
  text-decoration: none;
  text-align: center;
  cursor: pointer;
  padding: 0px 16px;
  border-radius: 2px;
  min-width: 80px;
  height: 32px;
  background-color: rgb(255, 255, 255);
  color: rgb(50, 49, 48);
  user-select: none;
}

.root-198:hover {
  background-color: rgb(243, 242, 241);
  color: rgb(32, 31, 30);
}

.border {
  border-bottom: 1px solid gray;
}

.my-2 {
  margin: 16px 0;
}

.text-danger {
  color: red !important;
}

`;

/**
 * 添加全局样式表
 * @param {string} css 样式
 * @returns 无
 */
function addGlobalStyle(css) {
  const head = document.getElementsByTagName("head")[0];
  if (!head) {
    return;
  }
  const style = document.createElement("style");
  style.innerHTML = css;
  head.appendChild(style);
}

(function () {
  "use strict";

  // Your code here...

  addGlobalStyle(cssStr);
})();
